﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace QuanLyThuNgan
{
    public partial class frmLoading : DevExpress.XtraEditors.XtraForm
    {
        public frmLoading()
        {
            InitializeComponent();
        }

        private DevExpress.Utils.WaitDialogForm Dlg = null;

        public void CreateWaitDialog()
        {
            //Dlg = new DevExpress.Utils.WaitDialogForm("Loading Components...");
            Dlg = new DevExpress.Utils.WaitDialogForm("Đang nạp...");
        }

        public void SetWaitDialogCaption(string fCaption)
        {
            if (Dlg != null)
            {
                Dlg.Caption = fCaption;
            }
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (Dlg != null)
            {
                Dlg.Close();
            }
        }
    }
}